package com.zpark.spring_02_ioc.pojo;

import java.io.Serializable;

/**
 * @PackageName: com.zpark.spring_02_ioc.pojo
 * @ClassName: User
 * @Description:
 * @author: RZS
 * @date: 2023/3/23  16:29
 */
public class User implements Serializable {
    private String username;
    private Integer age;

    // 初始化方法
    public void initUser(){
        System.out.println("user对象初始化成功");
    }

    // 销毁方法
    public void disUser(){
        System.out.println("user对象被销毁");
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

//    @Override
//    public String toString() {
//        return "User{" +
//                "username='" + username + '\'' +
//                ", age=" + age +
//                '}';
//    }
}
